// =============================================================
// CCommandLine
// ---------------------------------------
// Author : Woo-Hyun Kim
// Email : woorung@icu.ac.kr or woorung@nhncorp.com
// Date : Jul. 25, 2006
// =============================================================
#ifndef CCommandLinelH
#define CCommandLineH
//-----------------------------------------------------------------
#include <iostream>
#include <vector>
#include <string>

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>

using namespace std;
//-----------------------------------------------------------------
class CCommand {
private:
	string command;
	vector<string> args;
	vector<string>::iterator idx;

public:
};

class CCommandInfo {
private:
	int input_type;
	int output_type;
	int execution_type;

	vector<CCommand> commands;
	int pipe_num;
	string in_pipe;
	string out_pipe;
};

class CCommandLine {
private:
	string cmdline;
	CCommandInfo *cmd_info;

public:
	CCommandLine(string &cmdline);
	virtual ~CCommandLine();

	void init_cmdinfo();
	void parse();

	void free_info(parseInfo *);
	void print_info(parseInfo *);
};
//------------------------------------------------------------------
#endif
